Import-Module ServerManager
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
Set-Service NetTcpPortSharing -StartupType Automatic




Exchange global list fix:
To address this issue, re-create the Default Global Address List, and then verify that it is set as the default global address list. 

Exchange Server 2007
To re-create the Exchange 2007 Default Global Address List query 
Start the ADSI Edit tool. To do this, click Start, click Run, type adsiedit.msc, and then click OK. 

Note:  
In Windows Server 2008, ADSI Edit is installed by default. In Windows Server 2003, ADSI Edit is included with the Windows Support Tools. To install the Windows Support Tools, double-click Suptools.msi in the Support\Tools folder on the Windows Server 2003 CD.  

Connect to a domain controller if ADSI Edit is not already connected.

Expand the following path:

Configuration [<domainController>.contoso.com] 


CN=Configuration,DC=contoso,DC=com 


CN=Services 


CN=Microsoft Exchange 


CN=<OrganizationName> 


CN=Address Lists Container 


CN=All Global Address Lists 


In the details pane, right-click CN=Default Global Address List, and then click Properties.

On the Attribute Editor tab, click msExchQueryFilter, and then click Edit.

Type or paste the following query filter into the Value box, and then click OK:

 Copy Code 
(Alias -ne $null -and (((((ObjectClass -eq 'user' -or ObjectClass -eq 'contact') -or ObjectClass -eq 'msexchsystemmailbox') -or ObjectClass -eq 'msexchdynamicdistributionlist') -or ObjectClass -eq 'group') -or ObjectClass -eq 'publicfolder'))
 

On the Attribute Editor tab, click purportedSearch, and then click Edit.

Type or paste the following query filter into the Value box, and then click OK:

 Copy Code 
(&(mailNickname=*)(|(objectClass=user)(objectClass=contact)(objectClass=msexchsystemmailbox)(objectClass=msexchdynamicdistributionlist)(objectClass=group)(objectClass=publicfolder)))
 

Click OK, and then exit the ADSI Edit tool.

To determine whether the Default Global Address List is set as the default 
Start the Exchange Management Shell.

Type the following command, and then press ENTER:

 Copy Code 
get-globaladdresslist -Identity "Default Global Address List" | format-list
 

In the results that are returned, examine the value for the isDefaultGlobalAddressList attribute. For example, determine whether this attribute is set to True.

If the isDefaultGlobalAddressList attribute is set to False, modify the msExchRecipientFilterFlags attribute for the Default Global Address List. In this scenario, set the attribute value to 3.

To set the Default Global Address List as the default 
Start the ADSI Edit tool. To do this, click Start, click Run, type adsiedit.msc, and then click OK.

Connect to a domain controller if ADSI Edit is not already connected.

Expand the following path:

Configuration [<domainController>.contoso.com] 


CN=Configuration,DC=contoso,DC=com 


CN=Services 


CN=Microsoft Exchange 


CN=<OrganizationName> 


CN=Address Lists Container 


CN=All Global Address Lists 


In the details pane, right-click CN=Default Global Address List, and then click Properties.

On the Attribute Editor tab, click msExchRecipientFilterFlags, and then click Edit.

In the Value box, type 3, and then click OK two times.

Exit the ADSI Edit tool.

Exchange Server 2003
